<template>
  <div class="wrapper" ref="wrapper">
    <div class="w-content">
      <MovieCard />

      <div class="card" @click="go">
        <div class="header">
          <span class="cinema">万达国际影城</span>
          <img src="@/assets/images/user/arrow.png" alt="" />
          <span class="finish">待付款</span>
        </div>
        <div class="content">
          <img src="@/assets/images/user/post-1.png" alt="" />
          <div class="msg">
            <p class="title">帕丁顿熊</p>
            <p class="text">05月17日 17:00</p>
            <p class="text">五号厅 5排14座</p>
          </div>
        </div>
        <div class="price">总价：70元</div>
        <div class="num">2 张</div>
      </div>

      <div class="card" @click="go">
        <div class="header">
          <span class="cinema">万达国际影城</span>
          <img src="@/assets/images/user/arrow.png" alt="" />
          <span class="finish">待评价</span>
        </div>
        <div class="content">
          <img src="@/assets/images/user/post-3.png" alt="" />
          <div class="msg">
            <p class="title">大鱼海棠</p>
            <p class="text">05月16日 17:00</p>
            <p class="text">五号厅 5排14座</p>
          </div>
        </div>
        <div class="price">总价：70元</div>
        <div class="num">1 张</div>
      </div>

      <div class="card" @click="go">
        <div class="header">
          <span class="cinema">万达国际影城</span>
          <img src="@/assets/images/user/arrow.png" alt="" />
          <span class="finish">退款中</span>
        </div>
        <div class="content">
          <img src="@/assets/images/user/post-4.png" alt="" />
          <div class="msg">
            <p class="title">星空</p>
            <p class="text">05月16日 17:00</p>
            <p class="text">五号厅 5排14座</p>
          </div>
        </div>
        <div class="price">总价：70元</div>
        <div class="num">1 张</div>
      </div>
    </div>
  </div>
</template>

<script>
import MovieCard from './MovieCard.vue'
import BScroll from '@better-scroll/core'

export default {
  methods: {
    go() {
      this.$emit('jump-page')
    },
  },
  components: {
    MovieCard,
  },
  mounted() {
    this.$nextTick(() => {
      this.scroll = new BScroll(this.$refs.wrapper, {
        click:true
      })
    })
  },
}
</script>

<style lang="scss" scoped>
.card {
  position: relative;
  width: 620px;
  height: 300px;
  padding: 32px 28px 28px 28px;
  background: #33363d;
  border-radius: 12px;
  margin-bottom: 36px;

  .header {
    position: relative;
    display: flex;
    height: 50px;
    font-size: 28px;
    color: #ffffff;
    line-height: 50px;

    img {
      position: absolute;
      left: 180px;
      top: 10px;
      width: 13px;
      height: 26px;
    }
    .cinema {
      width: 85%;
    }
    .finish {
      width: 15%;
    }
  }

  .content {
    display: flex;
    width: 100%;
    height: 162px;
    margin-top: 20px;

    img {
      width: 140px;
      height: 100%;
      margin-right: 28px;
    }

    .title {
      margin: 20px 0;
      font-size: 28px;
      color: #ffffff;
    }

    .text {
      margin-bottom: 8px;
      opacity: 0.34;
      font-size: 24px;
      color: #ffffff;
      line-height: 28px;
    }
  }

  .price {
    opacity: 0.34;
    font-size: 24px;
    color: #ffffff;
    line-height: 24px;
    margin-top: 28px;
  }

  .num {
    position: absolute;
    right: 164px;
    top: 120px;
    font-size: 28px;
    color: #ffffff;
  }
}
.wrapper {
  height: calc(100vh - 200px);
  margin-top: 28px;
  overflow: hidden;

  .w-content {
    min-height: calc(100vh - 199px);
  }
}
</style>
